<?php if(isset($drinks)): ?>
    <?php if(!empty($drinks)): ?>
        <table class="condensed table-striped">
            <tr>
                <th>#</th>
                <th>Name</th>
                <th>Created</th>
            </tr>

        <?php foreach($drinks as $drink): ?>
            <tr>
                <td><?php echo $drink->id; ?></td>
                <td><?php echo anchor('/drink/details/' . $drink->id, $drink->name, ''); ?></td>
                <td><?php echo date('Y.m.d', strtotime($drink->created)); ?></td>
            </tr>
        <?php endforeach; ?>
        </table>
    <?php else: ?>
        <div class="warning">No recipes found!</div>
    <?php endif; ?>
<?php else: ?>
    <div class="alert alert-error">Failed to retrieve recipes!</div>
<?php endif; ?>

